<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/include/TLDInclude.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>签证列表</title>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>

<%@ include file="/WEB-INF/jsp/admin/page.jsp"%>

<script type="text/javascript">
$(document).ready(function(){
  $(".click").click(function(){
  $(".tip").fadeIn(200);
  });
  
  $(".tiptop a").click(function(){
  $(".tip").fadeOut(200);
});

  $(".sure").click(function(){
  $(".tip").fadeOut(100);
});

  $(".cancel").click(function(){
  $(".tip").fadeOut(100);
});

  
  var page = "${pageVisa.currentPage}";
  var totalResults = "${pageVisa.totalResults}";
  var pageSize = "${pageVisa.pageSize}";
  $("#pagination").pagination(totalResults, {items_per_page:pageSize,
num_display_entries:5,
num_edge_entries:1,
current_page:page-1,
prev_text: "上页",
next_text: "下页",
callback:function(vpage){
	
	if((page-1) !=vpage){
		var passportno =  $("#passportno").val();
		window.location.href="<%=request.getContextPath()%>"+"/admin/visa?page="+(vpage+1)+"&passportno="+passportno;
	}
	  }
	});
  

});


function p_del() { 
	var msg = "您真的确定要删除吗?  请确认！"; 
	if (confirm(msg)==true){ 
	return true; 
	}else{ 
	return false; 
	} 
	} 
</script>


</head>


<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="<%=request.getContextPath()%>/admin/visa">客户资料</a></li>
    <li><a href="<%=request.getContextPath()%>/admin/visa">基本内容</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    
    	<ul class="seachform">
      

 <form:form action="${ctx}/admin/visa" method="post" >
 

 <li><label>护照号</label><input id="passportno" name="passportno" type="text" value="${passportno}" class="scinput" /></li>
    
    
    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
    </form:form>
        </ul>
        
        
        <ul class="toolbar1">
          <li ><a href="<%=request.getContextPath()%>/admin/visaadd"><span><img src="../images/t01.png" /></span>添加</a></li>
       
        </ul>
    
    </div>
    
    
    <table class="tablelist">
    
    
    	<thead>
    	<tr>
        <th>序号</th>
        <th>护照号码</th>
        <th>签证类型</th>
        <th>国家</th>
        <th>用户名字</th>
        <th>同行</th>
        <th>录入时间</th>
        <th>管理</th>
        </tr>
        </thead>
        
        
        <tbody>
        
         <c:forEach items= "${pageVisa.data}" var="pagedata"  varStatus="status">
	        <tr>
	        <td>${status.index + 1}</td>
	        <td>${pagedata.passportno}</td>
	        <td>${pagedata.name}</td>
	        <td>${pagedata.country}</td>
	        <td>${pagedata.cname}</td>
	        <td>${pagedata.pname}</td>
	        <td>${pagedata.time}</td>
	        <td><a href="<%=request.getContextPath()%>/admin/dataadd?visaId=${pagedata.visaId}" class="tablelink">添加事件</a>            <a href="<%=request.getContextPath()%>/admin/visadata?vid=${pagedata.visaId}" class="tablelink">签证详细</a>          <a href="<%=request.getContextPath()%>/admin/visaup?vid=${pagedata.visaId}" class="tablelink">更新</a><a href="<%=request.getContextPath()%>/admin/deleteVisa?visaid=${pagedata.visaId}" onclick="javascript:return p_del()" class="tablelink"> 删除</a></td>
	        </tr> 
         </c:forEach>
        </tbody>
    </table>
    
    <div class="pagination" id="pagination">
    
    </div>
    
   <!-- 
    <div class="pagin">
    	<div class="message">共<i class="blue">1256</i>条记录，当前显示第&nbsp;<i class="blue">2&nbsp;</i>页</div>
        <ul class="paginList">
        <li class="paginItem"><a href="javascript:;"><span class="pagepre"></span></a></li>
        <li class="paginItem"><a href="javascript:;">1</a></li>
        <li class="paginItem current"><a href="javascript:;">2</a></li>
        <li class="paginItem"><a href="javascript:;">3</a></li>
        <li class="paginItem"><a href="javascript:;">4</a></li>
        <li class="paginItem"><a href="javascript:;">5</a></li>
        <li class="paginItem more"><a href="javascript:;">...</a></li>
        <li class="paginItem"><a href="javascript:;">10</a></li>
        <li class="paginItem"><a href="javascript:;"><span class="pagenxt"></span></a></li>
        </ul>
    </div> -->
    
    
    <div class="tip">
    	<div class="tiptop"><span>提示信息</span><a></a></div>
        
      <div class="tipinfo">
        <span><img src="../images/ticon.png" /></span>
        <div class="tipright">
        <p>是否确认对信息的修改 ？</p>
        <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
        </div>
        
        <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
        <input name="" type="button"  class="cancel" value="取消" />
        </div>
    
    </div>
    
    
    
    
    </div>
    
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>

</body>

</html>
